import request from '@/utils/request'

export default {
  getAllTeachers() {
    return request({
      url: '/eduservice/teacher/',
      method: 'get'
    })
  },

  getPageTeachers(current, size) {
    return request({
      url: `/eduservice/teacher/${current}/${size}`,
      method: 'get'
    })
  },

  updateTeacherById(teacher) {
    return request({
      url: `/eduservice/teacher/${teacher.id}`,
      method: 'put',
      data: teacher
    })
  },

  getTeacherById(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'get'
    })
  },

  removeTeacherById(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete'
    })
  },

  getTeachersCondition(current, size, teacherQuery) {
    return request({
      url: `/eduservice/teacher/teachersCondition/${current}/${size}`,
      method: 'post',
      data: teacherQuery
    })
  },

  insertTeacher(teacher) {
    return request({
      url: `/eduservice/teacher/`,
      method: 'post',
      data: teacher
    })
  },
}

